package pojo;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

import java.util.ArrayList;

/**
 * @author tms
 * @description 用于保存题目信息
 * @date 2023/9/25
 */
public class Exercises {
    /**
     * 存储运算式
     */
    private ArrayList<String> valueList = new ArrayList<String>();
    /**
     * 运算符个数
     */
    private int operatorNumber;
    /**
     * 答案
     */
    private SimpleStringProperty answer = new SimpleStringProperty();
    /**
     * 答案文件答案
     */
    private SimpleStringProperty studentAnswer = new SimpleStringProperty();
    /**
     * 题号
     */
    private SimpleIntegerProperty number = new SimpleIntegerProperty();

    public ArrayList<String> getValueList() {
        return valueList;
    }

    public void addValue(String value) {
        this.valueList.add(value);
    }

    public void addValue(int index, String value) {
        this.valueList.add(index, value);
    }

    public int getOperatorNumber() {
        return operatorNumber;
    }

    public void setOperatorNumber(int operatorNumber) {
        this.operatorNumber = operatorNumber;
    }

    public String getAnswer() {
        return answer.get();
    }

    public SimpleStringProperty answerProperty() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer.set(answer);
    }

    public int getNumber() {
        return number.get();
    }

    public SimpleIntegerProperty numberProperty() {
        return number;
    }

    public void setNumber(int number) {
        this.number.set(number);
    }

    public String getStudentAnswer() {
        return studentAnswer.get();
    }

    public SimpleStringProperty studentAnswerProperty() {
        return studentAnswer;
    }

    public void setStudentAnswer(String studentAnswer) {
        this.studentAnswer.set(studentAnswer);
    }
    public void setValueList(ArrayList<String> valueList) {
        this.valueList = valueList;
    }
}
